package com.xcity.game.shop.mystery.template;

import com.xcity.game.common.Currency;
import com.xcity.game.item.ItemTemplate;

import naga.x.App;
import naga.x.game.template.Template;
import naga.x.game.template.TemplateException;
import naga.x.game.template.TemplateService;
import naga.x.game.template.annotation.Excel;

/**
 * 神秘商店
 * @author yang.li
 *
 */
@Excel(value = "shop.xlsx", sheet = 1)
public class MysteryShopItemTemplate extends Template {

	/** 第n组 */
	protected int group;
	
	/** 货币类型 */
	protected Currency priceType;

	/** 数量 */
	protected int count;

	/** 价格(钻石,折扣后的价格) */
	protected int price;

	/** 原价 */
	protected int originalPrice;
	
	protected ItemTemplate ref;

	public int getGroup() {
		return group;
	}

	public void setGroup(int group) {
		this.group = group;
	}

	public Currency getPriceType() {
		return priceType;
	}

	public void setPriceType(Currency priceType) {
		this.priceType = priceType;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public int getOriginalPrice() {
		return originalPrice;
	}

	public void setOriginalPrice(int originalPrice) {
		this.originalPrice = originalPrice;
	}

	public ItemTemplate getRef() {
		return ref != null ? ref : (ref = App.getApp().getServiceManager().get(TemplateService.class).get(ItemTemplate.class, id));
	}

	@Override
	public void validate() throws TemplateException {
	}
}
